/**
 * Created by Administrator on 2017/8/23.
 */
var mongoose = require('../db/db');
var UserSchema = require('../schemas/user');

UserSchema.static('findById', function (id, callback) {
  return this.findOne({userId: id}).exec(callback);
})

module.exports = mongoose.model('User', UserSchema);
